import request from '@/utils/request'
var group_name = 'menu'
export default {
  getMenuList(page) { 
    return request({
      url: `/${group_name}/menuList`,
      method: 'post',
      data:page
    })
  },
  getAllMenu() { 
    return request({
      url: `/${group_name}/getAllMenu`,
      method: 'get'
    })
  },
  addMenu(menu) { 
    return request({
      url: `/${group_name}/addMenu`,
      method: 'post',
      data: menu
    })
  },
  deleteMenu(id) { 
    return request({
      url: `/${group_name}/deleteMenu/${id}`,
      method: 'delete'
    })
  },
  viewMenu(id) { 
    return request({
      url: `/${group_name}/viewMenu/${id}`,
      method: 'get'
    })
  },
  update(Menu) { 
    return request({
      url: `/${group_name}/update`,
      method: 'put',
      data: Menu
    })
  }
}